<script>
import logo from '@/views/images/R-C.png'
export default {
  //调用方法获取userName
  created() {
    this.getuserName()
  },
  name: "Home1",
  data() {
    return {
      logo: logo,
      //获取sessionStorage中的数组
      uid6:window.sessionStorage.getItem('uid6'),
    }
  },
  methods: {
    //调用方法获取userName
    getuserName() {
      this.uid2 = window.sessionStorage.getItem('uid6')
      console.log(666, this.uid2)
      //uid1的json转型为整形
      parseInt(this.uid2)
      this.$axios.post(`/zhuche/selectById/${this.uid2}`).then(res => {
        console.log(6666, res.data)
      })
    }
  }
}
</script>

<template>
  <el-container style="height: 750px; border: 1px solid #eee;">
    <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
      <el-image
          style="width: 190px;height:58px"
          :src="logo"
      ></el-image>
      <el-menu :router="true"
               default-active="2"
               class="el-menu-vertical-demo"
               @close="handleClose">
        <el-submenu index="1">
          <template slot="title">账号管理</template>
          <el-menu-item index="/ZH">所有账户</el-menu-item>
            <el-menu-item index="/Sshenhe">商户注册审核</el-menu-item>
            <el-menu-item index="/Gshenhe">供应商注册审核</el-menu-item>
        </el-submenu>
        <el-submenu index="2">
          <template slot="title">商品报价</template>
          <el-menu-item index="/Fabu">发布商品</el-menu-item>
          <el-menu-item index="/select">获取报价单</el-menu-item>
        </el-submenu>
        <el-submenu index="3">
          <template slot="title">采购订单</template>
          <el-menu-item index="/Caigou">订单中心</el-menu-item>
          <el-menu-item index="/Cshenhe">采购单审核</el-menu-item>
          <el-menu-item index="/select">数据分析</el-menu-item>
        </el-submenu>
        <el-submenu index="4">
          <template slot="title">库存</template>
          <el-menu-item index="/yao">制定入库单</el-menu-item>
          <el-menu-item index="/yao">入库明细</el-menu-item>
          <el-menu-item index="/yao">制定出库单</el-menu-item>
          <el-menu-item index="/select">出库明细</el-menu-item>
          <el-menu-item index="/select3">动态查询</el-menu-item>
        </el-submenu>
        <el-submenu index="6">
          <template slot="title">商品的上下架</template>
          <el-menu-item index="/select">审核商品并上架</el-menu-item>
          <el-menu-item index="/select3">注销及禁用</el-menu-item>
        </el-submenu>
        <el-submenu index="5">
          <template slot="title">分发订单</template>
          <el-menu-item index="/yao">订单中心</el-menu-item>
          <el-menu-item index="/select">数据分析</el-menu-item>
        </el-submenu>
        <el-menu-item index="/yao">轮播图维护</el-menu-item>
      </el-menu>
    </el-aside>

    <el-container>
      <h1 style="margin: auto;color:cornflowerblue ;font-style:italic;font-size: xxx-large">社区后台管理系统</h1>
      <el-header style="text-align: right; font-size: 12px">
        <el-dropdown>
          <i class="el-icon-setting" style="margin-right: 15px"></i>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item>查看</el-dropdown-item>
            <el-dropdown-item>新增</el-dropdown-item>
            <el-dropdown-item>删除</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
        <span>{{uid6}}</span>
      </el-header>

      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<style scoped>
.el-header {
  background-color: #B3C0D1;
  color: #333;
  line-height: 60px;
}

.el-aside {
  color: #333;
}
</style>